-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Azure-AI-Translation-Text 2.0.0-beta.1 #47412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
|
@Azure/dpg-devs for awareness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Azure AI Translation Text SDK from version 1.2.0-beta.1 to 2.0.0-beta.1, integrating support for the latest Azure Translator API version 2025-10-01-preview. The update introduces significant breaking changes including LLM model support for translation, adaptive custom translation capabilities, and removes deprecated features like dictionary lookups and sentence boundary detection.
Key Changes
- Added support for LLM/SLM model-based translations with configuration options for tone, gender, and deployment names
- Introduced
TranslationTargetclass to encapsulate translation configuration per target language - Renamed properties for consistency:
TargetLanguage→Language,Confidence→Score - Removed dictionary operations, sentence boundary detection, and text alignment features
- Updated API structure to use
TranslateInputItemfor per-item configuration
Reviewed changes
Copilot reviewed 66 out of 66 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Updated version from 1.2.0-beta.1 to 2.0.0-beta.1 |
| CHANGELOG.md | Documented breaking changes and new features for v2.0.0-beta.1 |
| TextTranslationServiceVersion.java | Added V2025_10_01_PREVIEW enum value and updated default |
| TranslationText.java | Renamed property, removed deprecated fields, added token metrics |
| TranslationTarget.java | New class for per-target translation configuration including LLM options |
| TranslateInputItem.java | New class for structured translation input with multi-target support |
| GetSupportedLanguagesResult.java | Replaced dictionary property with models list |
| DetectedLanguage.java | Renamed confidence property to score |
| TranslateTests.java | Updated tests to use new API structure and removed deprecated tests |
| GetLanguagesTests.java | Updated to use models instead of dictionary |
| test-resources.json | Added AIServices resource with gpt-4o-mini deployment configuration |
| README.md | Updated documentation removing deprecated features and updating examples |
| Multiple sample files | Updated to demonstrate new API patterns |
| Deleted files | Removed dictionary and sentence boundary related classes and tests |
...-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationText.java
Outdated
Show resolved
Hide resolved
weidongxu-microsoft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some spelling errors found by copilot.
We likely need the apiview to be reviewed by SDK architect, as most of the API is complately change in this version.
| * Enum value 3.0. | ||
| */ | ||
| V3_0("3.0"); | ||
| V3_0("3.0"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to customize this class, if 3.0 cannot be used in this new SDK
Description
Update Azure-AI-Translation-Text to 2.0.0-beta.1. Compatible with latest Translator API 2025-10-01-preview.
The new API introduces breaking changes, supporting translation configurations with TranslationTarget and option to translate with LLM & SLM models, also removed features like sentence breaks and dictionaries.
https://learn.microsoft.com/en-us/azure/ai-services/translator/text-translation/preview/overview
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines